How do you open workitem if you have the ID
![](http://jazz.net/_images/myphoto/00af7333eea5170d281f40b9c02ea2b0.jpg)
Accepted answer
![](http://jazz.net/_images/myphoto/00af7333eea5170d281f40b9c02ea2b0.jpg)
HI , Thanks for your response, here is the code that worked for me:
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IWorkItem workItem = workItemClient.findWorkItemById(Integer.valueOf(split[i]), IWorkItem.FULL_PROFILE, null);
WorkItemUI.openEditor(page, workItem);
Regards
Charbel
2 other answers
![](http://jazz.net/_images/myphoto/00af7333eea5170d281f40b9c02ea2b0.jpg)
Hi,
Tried the above code to open workitemUI.but it is giving the below error
java.lang.NoClassDefFoundError: com.ibm.team.workitem.rcp.ui.WorkItemUI
com.ibm.team.workitem.rcp.ui.jar is already there in the library
Comments
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
This will, as far as I understand it, only run inside an Eclipse or RCP extension. You would need to run this with the RTC SDK in an Eclipse client. In this case, you need to add the needed dependencies to the plugin.
It will not run in the plain java client libraries, because the platform is not available.